package com.sxjh.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;
import java.io.Serializable;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 任务
 * </p>
 *
 * @author zixin
 * @since 2021-06-06
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("it_task")
@ApiModel(value = "Task对象", description = "任务 ")
public class Task implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "唯一ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "派车单号")
    @TableField("order_no")
    private String orderNo;

    @ApiModelProperty(value = "计划单ID")
    @TableField("planned_order_id")
    private Integer plannedOrderId;

    @ApiModelProperty(value = "计划单no")
    @TableField("planned_order_no")
    private String plannedOrderNo;


    @ApiModelProperty(value = "车号ID")
    @TableField("wagon_number_id")
    private Integer wagonNumberId;

    @ApiModelProperty(value = "物料ID")
    @TableField("material_id")
    private Integer materialId;

    @ApiModelProperty(value = "装货点ID")
    @TableField("load_id")
    private Integer loadId;

    @ApiModelProperty(value = "卸货点ID")
    @TableField("unload_id")
    private Integer unloadId;


    @ApiModelProperty(value = "初磅重量")
    @TableField(value = "tare")
    private String tare;

    @ApiModelProperty(value = "初磅重量图片1")
    @TableField(value = "tare_img")
    private String tareImg;

    @ApiModelProperty(value = "初磅重量图片2")
    @TableField(value = "tare_img_two")
    private String tareImgTwo;

    @ApiModelProperty(value = "初磅时间")
    @TableField(value = "tare_at")
    private LocalDateTime tareAt;


    @ApiModelProperty(value = "重磅重量")
    @TableField(value = "gross")
    private String gross;

    @ApiModelProperty(value = "重磅重量图片1")
    @TableField(value = "gross_img")
    private String grossImg;

    @ApiModelProperty(value = "重磅重量图片2")
    @TableField(value = "gross_img_two")
    private String grossImgTwo;

    @ApiModelProperty(value = "重磅时间")
    @TableField(value = "gross_at")
    private LocalDateTime grossAt;


    @ApiModelProperty(value = "装车点是否跳过1:是,2否")
    @TableField(value = "up_is_skip")
    private Integer upIsSkip;

    @ApiModelProperty(value = "装车图片1")
    @TableField(value = "up_img")
    private String upImg;

    @ApiModelProperty(value = "装车图片2")
    @TableField(value = "up_img_two")
    private String upImgTwo;

    @ApiModelProperty(value = "卸车点是否跳过1:是,2否")
    @TableField(value = "down_is_skip")
    private Integer downIsSkip;

    @ApiModelProperty(value = "卸车图片1")
    @TableField(value = "down_img")
    private String downImg;

    @ApiModelProperty(value = "卸车图片2")
    @TableField(value = "down_img_two")
    private String downImgTwo;


    @ApiModelProperty(value = "当前节点0:未执行,1:初磅,2:装车拍照,3:二次磅,4:卸货拍照,5:刷卡完成")
    @TableField(value = "curr_node")
    private Integer currNode;

    @ApiModelProperty(value = "状态:1未执行,2执行中,3已完成,4已作废")
    @TableField(value = "status")
    private Integer status;

    @ApiModelProperty(value = "派车单开始日期")
    @DateTimeFormat(fallbackPatterns = {"yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm:ss"})
    @TableField(value = "start_date")
    private LocalDateTime startDate;

    @ApiModelProperty(value = "派车单结束日期")
    @DateTimeFormat(fallbackPatterns = {"yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm:ss"})
    @TableField(value = "end_date")
    private LocalDateTime endDate;


    @ApiModelProperty(value = "创建人")
    @TableField(value = "created_by", fill = FieldFill.INSERT)
    private Integer createdBy;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "created_at", fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @ApiModelProperty(value = "更新人")
    @TableField(value = "updated_by", fill = FieldFill.UPDATE)
    private Integer updatedBy;

    @ApiModelProperty(value = "更新时间")
    @TableField(value = "updated_at", fill = FieldFill.UPDATE)
    private LocalDateTime updatedAt;

    @ApiModelProperty(value = "删除人")
    @TableField("deleted_by")
    private Integer deletedBy;

    @ApiModelProperty(value = "删除时间")
    @TableField("deleted_at")
    private LocalDateTime deletedAt;

    @ApiModelProperty(value = "删除标记,1:否,-1:是")
    @TableField(value = "del_flag")
    private Integer delFlag = 1;

    @ApiModelProperty(value = "作废时间")
    @TableField(value = "invalid_at")
    private LocalDateTime invalidAt;

}
